import request from '@/modules/index/utils/request';
import qs from 'qs';

const store = {
  actions: {
    // 获取模型管理列表数据
    async mpaAllowCountSearch (context, params) {
      const data = await request({
        url: '/user/allow-count/search',
        method: 'get',
        params: params
      });
      return data;
    },
    // 批量删除
    async mpaAllowCountBatchDelete (context, params) {
      const data = await request({
        url: '/user/allow-count/batch-delete',
        method: 'post',
        data: params,
      });
      return data;
    },
    // 新增
    async mpaAllowCountBatchSave (context, params) {
      const data = await request({
        url: '/user/allow-count/batch-save',
        method: 'post',
        data: params,
        paramsSerializer: (params) => {
          return qs.stringify(params, { indices: false });
        },
      });
      return data;
    },
  }
};

export default store;
